import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 时间戳的处理
export function setTimer() {
  return Cookies.set('timeout', new Date().getTime())
}

export function getTimer() {
  return Cookies.get('timeout')
}

export function removeTimer() {
  return Cookies.remove('timeout')
}
